//
//  MCChooseForPlatformBottomView.swift
//  StoreManage
//
//  Created by MC on 2018/2/5.
//  Copyright © 2018年 MC. All rights reserved.
//

import UIKit

class MCChooseForPlatformBottomView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.backgroundColor = UIColor.white
        self.addSubview(selectedAllButton)
        selectedAllButton.snp.remakeConstraints { (make) ->Void in
            make.left.equalTo(15)
            make.centerY.equalTo(self)
            make.size.equalTo(CGSize.init(width: 80, height: 50))
        }
        
        
        self.addSubview(batchButton)
        batchButton.snp.remakeConstraints { (make) ->Void in
            make.right.bottom.top.equalTo(self)
            make.width.equalTo(MCScreenWidth * 0.4)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    lazy var selectedAllButton: UIButton = {
        let button = UIButton.init(type: UIButtonType.custom)
        button.titleLabel?.font = MCFont(13)
        button.setTitle("  全选", for: UIControlState.normal)
        button.setImage(#imageLiteral(resourceName: "GoodsManage_notSelected"), for: UIControlState.normal)
        button.setImage(#imageLiteral(resourceName: "GoodsManage_selected"), for: UIControlState.selected)
        button.setTitleColor(UIColor.black, for: UIControlState.normal)
        button.contentHorizontalAlignment = UIControlContentHorizontalAlignment.left
        return button
    }()
    
    lazy var batchButton: UIButton = {
        let button = UIButton.init(type: UIButtonType.custom)
        button.backgroundColor = UIColor.MCMain
        button.titleLabel?.font = MCFont(14)
        button.backgroundColor = UIColor.MCMain
        button.setTitle("批量上架", for: UIControlState.normal)
        button.setTitleColor(UIColor.white, for: UIControlState.normal)
        return button
    }()
}
